import request from '@/utils/request'

export function getEquipmentList(params) {
  return request({
    url: '/api/equipment/list/all',
    method: 'post',
    data: params
  })
}

export function addEquipment(params) {
  return request({
    url: '/api/equipment/add',
    method: 'post',
    data: params
  })
}

export function updateEquipment(params) {
  return request({
    url: '/api/equipment/edit',
    method: 'post',
    data: params
  })
}

export function getEquipmentById(id) {
  return request({
    url: '/api/equipment/detail',
    method: 'get',
    params: { 'id': id }
  })
}

export function deleteEquipmentById(id) {
  return request({
    url: '/api/equipment/delete',
    method: 'get',
    params: { 'id': id }
  })
}

export function opEquipmentById(id) {
  return request({
    url: '/api/equipment/op',
    method: 'get',
    params: { 'id': id }
  })
}
